package com.travelranking.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name="COUNTRY")
@NamedQueries({
	@NamedQuery(name="listAllCountry", query="from CountryEntity order by name asc"),
	@NamedQuery(name="getCountryById", query="from CountryEntity ce where ce.id = :id")
})
public class CountryEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	private Long id;
	private String name;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID")
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name="NAME")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}
